clear;clc;

load P00Data;

temp=struct('SampleBeg',[], 'SampleEnd',[], 'OOSBeg',[], 'OOSEnd',[]);
Results=repmat(temp,46,1);

for i = 1:46
    Results(i).SampleBeg = VARS(i).SampleBeg;
    Results(i).SampleEnd = VARS(i).SampleEnd;
    if strcmp(VARS(i).Freq,'Monthly')
        Results(i).OOSBeg = Results(i).SampleBeg + 2000;
    elseif strcmp(VARS(i).Freq,'Quarterly')
        Results(i).OOSBeg = Results(i).SampleBeg + 200;
    elseif strcmp(VARS(i).Freq,'Semiannual')
        Results(i).OOSBeg = Results(i).SampleBeg + 200;
    elseif strcmp(VARS(i).Freq,'Annual')
        Results(i).OOSBeg = Results(i).SampleBeg + 20;
    end
    Results(i).OOSEnd = Results(i).SampleEnd;
end
% Change some OOSBeg dates manually for some variables that start in the 1990s
Results(2).OOSBeg = Results(2).SampleBeg + 1000; % vp
Results(3).OOSBeg = Results(3).SampleBeg + 1000; %impvar
Results(4).OOSBeg = Results(4).SampleBeg + 1000; % vrp
Results(22).OOSBeg = Results(22).SampleBeg + 1000; % svix
Results(8).OOSBeg = Results(8).SampleBeg + 100;  % crdstd

save ResultsFile Results;